import 'package:flutter/material.dart';

class XAssetsImage {
  ///
  /// 加载assets图片
  ///
  static Widget load(String name, {Size? size, BoxFit fit = BoxFit.contain}) {
    return Image.asset(
      "assets/$name.png",
      width: size?.width,
      height: size?.height,
      fit: fit,
      gaplessPlayback: true,
    );
  }
}
